﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using ServicesComponent;
using ServicesComponent.Repositories;

    public static  class FactoryServices
    {
       

        // Note **** param=IRepository -> return=1 trong các lớp dẫn xuất của interface param - luôn như vậy-> với 2 lần kế thừa-Giống DP dataobject -> tạo 1 class Repository
        //public static void GetServices(IRepository<T> IRepository) //<T> - class
        //{
        //    if (IRepository == Icus)
        //    {
        //        IRepository = new ServicesComponent.Repositories.CustomerRepository();
        //       // IRepository = new Repository(); //Có thẻ dùng singletion
        //    }
        //}

        //public static void GetServicesBaoAn(IBaoAnRepository IRepository) //<T> - class
        //{
        //    if (IRepository == IBaoAn)
        //    {
        //        IRepository = new ServicesComponent.Repositories.BaoAnRepository();
        //        // IRepository = new Repository(); //Có thẻ dùng singletion
        //    }
        //}
        //Có thẻ dùng singletion - chua quanr lys  dc doi tuong khoi tao

        public static IUserRepository GetServicesUser(IUserRepository IRepository) //<T> - class 
        {
            IRepository = new ServicesComponent.Repositories.UserRepository();
            return IRepository;
        }

        public static IBaoAnRepository GetServicesBaoAn(IBaoAnRepository IRepository) //<T> - class
        {          
                IRepository = new ServicesComponent.Repositories.BaoAnRepository();          
                return IRepository;
        }

        public static IBienLaiThuRepository GetServicesBienLaiThu(IBienLaiThuRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.BienLaiThuRepository();
            return IRepository;
        }
        public static IBienLaiThuChiTietRepository GetServicesBienLaiThuChiTiet(IBienLaiThuChiTietRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.BienLaiThuChiTietRepository();
            return IRepository;
        }
        public static IBienLaiTraRepository GetServicesBienLaiTra(IBienLaiTraRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.BienLaiTraRepository();
            return IRepository;
        }
        public static IBienLaiTraChiTietRepository GetServicesBienLaiTraChiTiet(IBienLaiTraChiTietRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.BienLaiTraChiTietRepository();
            return IRepository;
        }
        public static IBlockRepository GetServicesBlock(IBlockRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.BlockRepository();
            return IRepository;
        }
        public static IClassRepository GetServicesClass(IClassRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.ClassRepository();
            return IRepository;
        }
        public static IChiTietThanhPhanThucPhamRepository GetServicesChiTietThanhPhanThucPham(IChiTietThanhPhanThucPhamRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.ChiTietThanhPhanThucPhamRepository();
            return IRepository;
        }
        public static IDanhMucThuChiRepository GetServicesDanhMucThuChi(IDanhMucThuChiRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.DanhMucThuChiRepository();
            return IRepository;
        }
        public static IDiemDanhRepository GetServicesDiemDanh(IDiemDanhRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.DiemDanhRepository();
            return IRepository;
        }
        public static IDinhMucThuRepository GetServicesDinhMucThu(IDinhMucThuRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.DinhMucThuRepository();
            return IRepository;
        }
        public static IDonViTinhRepository GetServicesDonViTinh(IDonViTinhRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.DonViTinhRepository();
            return IRepository;
        }
        public static IKhauPhanAnChiTietRepository GetServicesKhauPhanAnChiTiet(IKhauPhanAnChiTietRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.KhauPhanAnChiTietRepository();
            return IRepository;
        }
        public static IKhauPhanAnRepository GetServicesKhauPhanAn(IKhauPhanAnRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.KhauPhanAnRepository();
            return IRepository;
        }
        public static IMauSuatAnChiTietRepository GetServicesMauSuatAnChiTiet(IMauSuatAnChiTietRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.MauSuatAnChiTietRepository();
            return IRepository;
        }
        public static IMauSuatAnRepository GetServicesMauSuatAn(IMauSuatAnRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.MauSuatAnRepository();
            return IRepository;
        }
        public static INationalitieRepository GetServicesNationalitie(INationalitieRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.NationalitieRepository();
            return IRepository;
        }
        public static INhanVienRepository GetServicesNhanVien(INhanVienRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.NhanVienRepository();
            return IRepository;
        }
        public static INhomTuoiRepository GetServicesNhomTuoi(INhomTuoiRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.NhomTuoiRepository();
            return IRepository;
        }

        public static INhomThucPhamRepository GetServicesNhomThucPham(INhomThucPhamRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.NhomThucPhamRepository();
            return IRepository;
        }
        public static IPhanCongGiangDayRepository GetServicesPhanCongGiangDay(IPhanCongGiangDayRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.PhanCongGiangDayRepository();
            return IRepository;
        }
        public static IPhanLopRepository GetServicesPhanLop(IPhanLopRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.PhanLopRepository();
            return IRepository;
        }
        public static IPhieuChiChiTietRepository GetServicesPhieuChiChiTiet(IPhieuChiChiTietRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.PhieuChiChiTietRepository();
            return IRepository;
        }
        public static IPhieuChiRepository GetServicesPhieuChi(IPhieuChiRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.PhieuChiRepository();
            return IRepository;
        }
        public static IPhongBanRepository GetServicesPhongBan(IPhongBanRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.PhongBanRepository();
            return IRepository;
        }
        public static ISchoolRepository GetServicesSchool(ISchoolRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.SchoolRepository();
            return IRepository;
        }
        public static ISchoolYearRepository GetServicesSchoolYear(ISchoolYearRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.SchoolYearRepository();
            return IRepository;
        }
        public static IStudentRepository GetServicesStudent(IStudentRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.StudentRepository();
            return IRepository;
        }
        public static IStuReviewRepository GetServicesStuReview(IStuReviewRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.StuReviewRepository();
            return IRepository;
        }
        public static ITaiSanRepository GetServicesTaiSan(ITaiSanRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.TaiSanRepository();
            return IRepository;
        }
        public static IThanhPhanThucPhamRepository GetServicesThanhPhanThucPham(IThanhPhanThucPhamRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.ThanhPhanThucPhamRepository();
            return IRepository;
        }
        public static IThucPhamRepository GetServicesThucPham(IThucPhamRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.ThucPhamRepository();
            return IRepository;
        }
        public static ITieuChuanDinhDuongRepository GetServicesTieuChuanDinhDuong(ITieuChuanDinhDuongRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.TieuChuanDinhDuongRepository();
            return IRepository;
        }
        public static IThongKeTaiSanRepository GetServicesThongKeTaiSan(IThongKeTaiSanRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.ThongKeTaiSanRepository();
            return IRepository;
        }
        public static ITheoDoiThiDuaRepository GetServicesTheoDoiThiDua(ITheoDoiThiDuaRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.TheoDoiThiDuaRepository();
            return IRepository;
        }

        public static ITrinhDoRepository GetServicesTrinhDo(ITrinhDoRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.TrinhDoRepository();
            return IRepository;
        }
        public static ITruongRepository GetServicesTruong(ITruongRepository IRepository) //<T> - class
        {
            IRepository = new ServicesComponent.Repositories.TruongRepository();
            return IRepository;
        }



    }
